package com.hhhn.wk.main.tab4.allorder.adapter;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import com.hhhn.wk.main.tab4.allorder.fragment.Order01Fragment;
import com.hhhn.wk.main.tab4.allorder.fragment.Order02Fragment;
import com.hhhn.wk.main.tab4.allorder.fragment.Order03Fragment;
import com.hhhn.wk.main.tab4.allorder.fragment.Order04Fragment;
import com.hhhn.wk.main.tab4.allorder.fragment.Order05Fragment;
/**
 * * * * * * * * * * * *
 * @author：文珂    ｡◕‿◕｡ *
 * Data：2018/1/2 0002    ｡◕‿◕｡ *
 * Function：      ｡◕‿◕｡ *
 *
 * * * * * * * * * * * */
public class MyOrderFragmentAdapter extends FragmentStatePagerAdapter {
    private String[] tabTilte;
    public MyOrderFragmentAdapter(FragmentManager fm, String[] tabTitle) {
        super(fm);
        this.tabTilte = tabTitle;
    }
    @Override
    public Fragment getItem(int position) {
        switch (position) {
            case 0:
                return new Order01Fragment();
            case 1:
                return new Order02Fragment();
            case 2:
                return new Order03Fragment();
            case 3:
                return new Order04Fragment();
            case 4:
                return new Order05Fragment();
        }
        return null;
    }
    @Override
    public int getCount() {
        return tabTilte.length;
    }
}
